home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Directorty Opus 5 - Magellan 2
/
Opus 5 - Magellan 2.iso
/
Extras
/
DLGoodies
/
assign.dopus5
next >
Wrap
Text File
|
1996-08-29
|
1KB
|
49 lines
/*
* Assign a logical name to either a
* 1) selected directory in sourcelister if ONE dir is selected.
* 2) path of source lister otherwise.
*
* V1.0 (14.7.96) by David Lübbren.
*
* Call: Arexx DOpus5:Arexx/assign.dopus5 {Qp}
*/
OPTIONS RESULTS
PARSE ARG dopusport
IF dopusport ~= "" THEN ADDRESS VALUE dopusport
ELSE DO
SAY "No DOpus running !"
EXIT
END
AssignmentDir = ""
lf = '0a'x
lister query source
IF rc = 0 THEN DO
PARSE VAR result handle .
lister query handle path
IF rc = 0 THEN DO
AssignmentDir = STRIP(result, 'B', '"')
lister query handle seldirs stem Directory.
IF rc = 0 & Directory.count = 1 THEN DO
AssignmentDir = AssignmentDir || Directory.0
END
ELSE DO
AssignmentDir = STRIP(AssignmentDir, 'T', '/')
END
END
END
IF AssignmentDir ~= "" THEN DO
dopus getstring '"Assign to'lf''''AssignmentDir'''" 50 "" Ok|Cancel'
IF dopusrc ~= 0 THEN DO
LogicalDir = STRIP(STRIP(result, 'B', '"'), 'T', ':')
LogicalDir = LogicalDir ||':'
ADDRESS COMMAND 'Assign ' LogicalDir AssignmentDir
END
END
EXIT